<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <meta name="geometry" content="diagram">
  <link rel="stylesheet" href="./assets/common.css">
  <title>city demo</title>
  <style>
	#map { position:absolute; top:0; bottom:0; width:100%; }
  #timepannel {
    background: white;
    z-index: 10;
    position: absolute;
    right:50px;
    padding: 10px;
  }
  </style>
</head>

<body>
 <div id ='timepannel'>时间: 6时</div>
<div id="map">

</div>
<script src="https://webapi.amap.com/maps?v=1.4.8&key=f28fca5384129d180ad82915156a9baf&plugin=Map3D"></script>
<script src="./assets/jquery-3.2.1.min.js"></script>
<script src="../build/L7.js"></script>
<script>
var buildLayer =null;
const scene = new L7.Scene({
  id: 'map',
  mapStyle: 'normal', // 样式URL
  center: [120.1998700000, 30.2638300000],
  pitch: 0,
  zoom: 14,
  minZoom: 5,
  maxZoom: 18
});
scene.on('loaded', () => {
  const layer = scene.LineLayer({
        zIndex: 3
      }).source([{
        'x': 120.1998700000,
        'y': 30.2638300000,
        'x1': 119.575328,
        'y1': 30.106775
      }],{
        parser: {
          type: 'json',
          x: 'x',
          y: 'y',
          x1: 'x1',
          y1: 'y1'
        }
      }).shape('greatCircle').size(2).color('rgb(13,64,140)').animate({
        enable: false,
        interval: 1,
        duration: 2,
        trailLength: 0.8
      }).style({
        opacity: 1
      }).render()
      console.log(layer);
      new L7.Marker({
      color: 'red'
    }).setLnglat([120.1998700000, 30.2638300000]).addTo(scene);
      scene.map.add(new AMap.Marker({
        position: new AMap.LngLat(120.1998700000, 30.2638300000),
         // icon: icon, // 添加 Icon 实例
          zoom: 13,
          //offset: new AMap.Pixel(-0.2 * this.rem, -0.4 * this.rem)
      }))
})
</script>
</body>
</html>

